<template>
  <div class="customerCard">
    <div class="container">
      <div class="Individual" v-for="(item,index) in list" :key="index">
        <div class="card">
          <a :href="item.linkUrl">
            <p class="content">{{item.title}}</p>
          </a>
          <p class="time">更新时间：{{item.gmtCreated | formatDate}}</p>
        </div>
        <el-divider></el-divider>
      </div>
    </div>
  </div>
</template>

<script>
import { formatDate } from "../../utils/tools";
export default {
  props: {
    articleList: Array
  },
  data() {
    return {
      list: []
    };
  },
  watch: {
    articleList(val) {
      this.list = val;
    }
  },
  filters: {
    formatDate(time) {
      let date = new Date(time);
      return formatDate(date, "yyyy-MM-dd hh:mm");
    }
  }
};
</script>

<style>
.customerCard {
  width: 100%;
  margin: 0px auto;
  /* height: 370px; */
}
.customerCard .container {
  background: #fff;
  width: 100%;
  /* height: 370px; */
  /* line-height: 370px; */
  margin: 0 auto;
}
.customerCard .container .Individual {
  width: 90%;
  margin: 0 auto;
  height: 85px;
}
.customerCard .container .Individual .card {
  height: 85px;
  line-height: 85px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.customerCard .container .Individual .content {
  font-family: PingFangSC;
  font-weight: 400;
  font-size: 17px;
  color: rgba(0, 0, 0, 1);
  letter-spacing: 0px;
  line-height: 29px;
}
.customerCard .container .Individual .content:hover {
  color: #ffc310;
  cursor: pointer;
}
.customerCard .container .Individual .time {
  font-family: PingFangSC;
  font-weight: 400;
  font-size: 14px;
  color: rgb(156, 156, 156);
  letter-spacing: 0px;
  line-height: 23px;
}
@media screen and (max-width: 900px) {
  .customerCard .container .Individual .content {
    font-size: 15px;
  }
}
@media screen and (max-width: 843px) {
  .customerCard .container .Individual .card {
    display: block;
  }
  .customerCard .container .Individual .content {
    height: 47px;
    line-height: 47px;
  }
  .customerCard .container .Individual .time {
    text-align: left;
  }
}
@media screen and (max-width: 567px) {
  .customerCard .container .Individual .content {
    line-height: 47px;
  }
}
@media screen and (max-width: 596px) {
  .customerCard .container .Individual .content {
    line-height: 23px;
    padding-top: 10px;
  }
  @media screen and (max-width: 325px) {
    .customerCard .container .Individual .content {
      line-height: 25px;
    }
    .customerCard .container .Individual .content {
      height: 50px;
    }
  }
}
</style>